package com.atjinggu.jinggumail.seckill.config;

import com.atjinggu.jinggumail.seckill.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author jingming
 * @Type SeckillWebConfig.java
 * @Desc
 * @date 2021/3/24 15:43
 */
@Configuration
public class SeckillWebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/**");
    }
}